@extends("Admin.Manage.image_manage")

@section("body")
@section("main")
    <div class="col-sm-10">
        <div class="panel panel-default">
            <div class="panel panel-body">
                <div class="btn-group" role="group">
                    <button type="button" class="btn btn-success dropdown-toggle" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
                        排序image_id
                        <span class="caret"></span>
                    </button>
                    <ul class="dropdown-menu">
                        <li><a href="/user_sImage?sort=image_create_time">创建时间</a></li>
                        <li><a href="/user_sImage?sort=image_intro">文章</a></li>
                    </ul>
                </div>

                <table class="table table-bordered">
                    <tr>
                        <th>标题</th>
                        <th>相对路径</th>
                        <th>创建时间</th>
                        <th>操作</th>
                    </tr>
                    @foreach($inputData as $u)
                        <tr style="color:#808080">
                            <th><a href="{{$u->image_path}}" target="_blank">文章名为:"{{$u->image_name}}"的图片</a></th>
                            <th>{{$u->image_path}}</th>
                            <th>{{$u->image_create_time}}</th>
                            <th>

                                <!-- Button trigger modal -->
                                <button type="button" class="btn btn-danger btn-sm" data-toggle="modal" data-target="#myModal{{$u->image_id}}">
                                    删除
                                </button>

                                <!-- Modal -->
                                <div class="modal fade" id="myModal{{$u->image_id}}" tabindex="-1" role="dialog" aria-labelledby="myModalLabel">
                                    <div class="modal-dialog" role="document">
                                        <div class="modal-content">
                                            <div class="modal-header">
                                                <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
                                                <h4 class="modal-title" id="myModalLabel">图片删除操作窗口</h4>
                                            </div>
                                            <div class="modal-body">
                                                确定要删除 "{{$u->image_name}}" 这张图片吗?
                                            </div>
                                            <div class="modal-footer">
                                                <button type="button" class="btn btn-default" data-dismiss="modal">关闭</button>
                                                <a href="user_dImage/{{$u->image_id}}" class="btn btn-danger">确定</a>
                                            </div>
                                        </div>
                                    </div>
                                </div>
                            </th>
                        </tr>

                    @endforeach
                </table>
                <div>
                    <b>当前第 {{$nowPage}} 页 | 共 {{$allPage}} 页</b>
                </div>

                <div class="col-sm-6 col-sm-offset-2">
                    <?php echo $fen; ?>
                </div>

            </div>
        </div>
    </div>
    @append
@append